import request from '@/utils/request'
import data from "@/views/system/dict/data.vue";

// 获取路由
export function fileLoad(data) {
  return request({
    url: '/file/upload',
    method: 'post',
    data:data
  })
}
export function checkFile(md5) {
  return request({
    url: '/video/check',
    method: 'get',
    params: {
      md5:md5
    }
  })
}


  export function getSlice(md5) {
    return request({
      url: '/video/slice',
      method: 'get',
      params: {
        md5:md5
      }
    })
}
export function initTask(md5,chunkNum,chunkSize,totalSize) {
  return request({
    url: '/video/init',
    method: 'post',
    data:{
      fileMd5:md5,
      chunkNum:chunkNum,
      chunkSize:chunkSize,
      totalSize:totalSize
    }
  })
}
export function uploadSliceOne(md5,now,file) {
  return request({
    url: '/video/init',
    method: 'post',
    data:{
      md5:md5,
      now:now,
      file:file
    }
  })
}
